package com.hzhr.iot.device.controller;

import com.hzhr.iot.core.annotation.ApiImplicitInternalParams;
import com.hzhr.iot.core.annotation.Author;
import com.hzhr.iot.core.exception.ServiceException;
import com.hzhr.iot.device.controller.base.BaseController;
import com.hzhr.iot.device.model.collectDevice.CollectDeviceGetModel;
import com.hzhr.iot.device.service.CollectDeviceService;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;

import java.util.Map;

@Api(tags = "CollectDevice", description = "采集设备")
@RestController
@RequestMapping(value = "")
public class CollectDeviceController extends BaseController {
    @Autowired
    CollectDeviceService collectDeviceService;

    //region /collect-devices GET
    //region swagger响应码 : get
    @ApiResponses({
            @ApiResponse(code = 200, message = "成功"),
    })
    //endregion
    //region swagger说明 : get
    @ApiOperation(value="查询用户管辖范围下的采集设备", notes="查询用户管辖范围下的采集设备  \n简介 : 查询用户管辖范围下的采集设备  \n步骤 :  \n1. 查询用户管辖范围下的采集设备  \n2. 返回信息  \n",produces = "application/json")
    //endregion
    //region swagger参数 : get
    @ApiImplicitParams({
            @ApiImplicitParam(name = "token", value = "令牌",required = true, dataType = "string", paramType = "header"),

            @ApiImplicitParam(name = "show", value = "展示形式 one:展示一个,list:展示列表,null(空值):不展示", required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "show_total", value = "是否展示总数", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "show_info", value = "是否展示详情", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "show_type", value = "是否展示设备型号信息", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "show_iotDevice", value = "是否展示所属物联网设备信息", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "show_gasUser", value = "是否展示所属燃气用户信息", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "show_gasConsume", value = "是否展示总用气量", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "show_alarmCount", value = "是否展示总报警数", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "show_dept", value = "是否展示部门信息", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "show_outId", value = "是否展示外部系统唯一键", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "page", value = "页数", defaultValue = "1",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "count", value = "每页数量", defaultValue = "1",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "equal_id", value = "筛选条件 : where CollectDeviceModel.id = #{equal_id}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "equal_code", value = "筛选条件 : where CollectDeviceModel.code = #{equal_code}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "equal_companyId", value = "筛选条件 : where CollectDeviceModel.companyId = #{equal_companyId}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "equal_deptId", value = "筛选条件 : where CollectDeviceModel.deptId = #{equal_deptId}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "equal_deptCode", value = "筛选条件 : where CollectDeviceModel.deptCode = #{equal_deptCode}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "equal_categoryCode", value = "筛选条件 : where CollectDeviceModel.categoryCode = #{equal_categoryCode}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "like_code", value = "筛选条件 : where CollectDeviceModel.code like #{like_code}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "equal_iotDeviceId", value = "筛选条件 : where CollectDeviceModel.iotDeviceId = #{equal_iotDeviceId}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "like_iotDeviceCode", value = "筛选条件 : where CollectDeviceModel.iotDeviceCode like #{like_iotDeviceCode}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "like_gasUserName", value = "筛选条件 : where CollectDeviceModel.gasUserName like #{like_gasUserName}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "like_gasUserCode", value = "筛选条件 : where CollectDeviceModel.gasUserCode like #{like_gasUserCode}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "like_gasUserAddress", value = "筛选条件 : where CollectDeviceModel.gasUserAddress like #{like_gasUserAddress}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "greaterthanorequal_createTime", value = "筛选条件 : where CollectDeviceModel.createTime >= #{greaterthanorequal_createTime}",required = false, dataType = "long", paramType = "query"),
            @ApiImplicitParam(name = "lessthan_createTime", value = "筛选条件 : where CollectDeviceModel.createTime < #{lessthan_createTime}",required = false, dataType = "long", paramType = "query"),
            @ApiImplicitParam(name = "equal_gasUserId", value = "筛选条件 : where CollectDeviceModel.gasUserId = #{equal_gasUserId}",required = false, dataType = "long", paramType = "query"),
            @ApiImplicitParam(name = "equal_prodFactoryId", value = "筛选条件 : where CollectDeviceModel.prodFactoryId = #{equal_prodFactoryId}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "equal_iotDeviceCompanyName", value = "筛选条件 : where CollectDeviceModel.iotDeviceCompanyName = #{equal_iotDeviceCompanyName}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "equal_gasUserCode", value = "筛选条件 : where CollectDeviceModel.gasUserCode = #{equal_gasUserCode}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "like_deptCode", value = "筛选条件 : where CollectDeviceModel.deptCode like #{like_deptCode}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "equal_iotDeviceCompanyId", value = "筛选条件 : where CollectDeviceModel.iotDeviceCompanyId = #{equal_iotDeviceCompanyId}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "equal_iotDeviceCompanyId", value = "筛选条件 : where CollectDeviceModel.iotDeviceCompanyId = #{equal_iotDeviceCompanyId}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "equal_prodFactoryIotCompanyId", value = "筛选条件 : where CollectDeviceModel.prodFactoryIotCompanyId = #{equal_prodFactoryIotCompanyId}",required = false, dataType = "int", paramType = "query"),

    })
    @ApiImplicitInternalParams({
            @ApiImplicitParam(name = "_token", value = "令牌",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-user-id", value = "用户编号",required = true, dataType = "int", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-user-code", value = "用户代码",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-user-name", value = "用户名",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-company-id", value = "公司编号",required = true, dataType = "int", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-dept-id", value = "部门编号",required = true, dataType = "int", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-user-type", value = "用户类型(关联: common_service.options.code, typeCode = 'USER_TYPE')",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-transaction-id", value = "交易流水号",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-transaction-type", value = "交易类型",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-access-mode", value = "访问模式 0:一般 1:全局",defaultValue = "0", required = false, dataType = "int", paramType = "header"),

            @ApiImplicitParam(name = "_show", value = "展示形式 one:展示一个,list:展示列表,null(空值):不展示", required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "_show_total", value = "是否展示总数", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "_show_info", value = "是否展示详情", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "_show_type", value = "是否设备型号信息", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "_show_iotDevice", value = "是否所属物联网设备信息", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "_show_gasUser", value = "是否所属燃气用户信息", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "_show_gasConsume", value = "是否展示总用气量", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "_show_alarmCount", value = "是否展示总报警数", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "_show_dept", value = "是否展示部门信息", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "_show_outId", value = "是否展示外部系统唯一键", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "_is_paging", value = "是否分页", defaultValue = "true",required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "_page", value = "页数", defaultValue = "1",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "_count", value = "每页数量", defaultValue = "1",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "_equal_id", value = "筛选条件 : where COLLECT_DEVICE.ID = #{_equal_id}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "_equal_code", value = "筛选条件 : where COLLECT_DEVICE.CODE = #{_equal_code}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "_equal_companyId", value = "筛选条件 : where COLLECT_DEVICE.COMPANY_ID = #{_equal_companyId}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "_equal_deptId", value = "筛选条件 : where COLLECT_DEVICE.DEPT_ID = #{_equal_deptId}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "_equal_deptCode", value = "筛选条件 : where COLLECT_DEVICE.DEPT_CODE = #{_equal_deptCode}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "_equal_categoryCode", value = "筛选条件 : where COLLECT_DEVICE.CATEGORY_CODE = #{_equal_categoryCode}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "_like_code", value = "筛选条件 : where COLLECT_DEVICE.CODE like #{_like_code}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "_equal_iotDeviceId", value = "筛选条件 : where COLLECT_DEVICE.IOT_DEVICE_ID = #{_equal_iotDeviceId}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "_like_iotDeviceCode", value = "筛选条件 : where COLLECT_DEVICE.IOT_DEVICE(关联键：IOT_DEVICE_ID).CODE like #{_like_iotDeviceCode}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "_like_gasUserName", value = "筛选条件 : where COLLECT_DEVICE.GAS_USER_NAME like #{_like_gasUserName}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "_like_gasUserCode", value = "筛选条件 : where COLLECT_DEVICE.GAS_USER_CODE like #{_like_gasUserCode}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "_like_gasUserAddress", value = "筛选条件 : where COLLECT_DEVICE.GAS_USER_ADDRESS like #{_like_gasUserAddress}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "_greaterthanorequal_createTime", value = "筛选条件 : where COLLECT_DEVICE.CREATE_TIME >= #{_greaterthanorequal_createTime}",required = false, dataType = "long", paramType = "query"),
            @ApiImplicitParam(name = "_lessthan_createTime", value = "筛选条件 : where COLLECT_DEVICE.CREATE_TIME < #{_lessthan_createTime}",required = false, dataType = "long", paramType = "query"),
            @ApiImplicitParam(name = "_equal_gasUserId", value = "筛选条件 : where COLLECT_DEVICE.GAS_USER_ID = #{_equal_gasUserId}",required = false, dataType = "long", paramType = "query"),
            @ApiImplicitParam(name = "_equal_prodFactoryId", value = "筛选条件 : where COLLECT_DEVICE.COLLECT_DEVICE_TYPE(关联键：TYPE_ID).PROD_FACTORY_ID = #{_equal_prodFactoryId}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "_equal_iotDeviceCompanyName", value = "筛选条件 : where COLLECT_DEVICE.IOT_DEVICE(关联键：IOT_DEVICE_ID).USER_COMPANY(关联键：COMPANY_ID).NAME = #{equal_iotDeviceCompanyName}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "_equal_gasUserCode", value = "筛选条件 : where COLLECT_DEVICE.GAS_USER_CODE = #{_equal_gasUserCode}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "_like_deptCode", value = "筛选条件 : where COLLECT_DEVICE.DEPT_CODE like #{_like_deptCode}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "_equal_iotDeviceCompanyId", value = "筛选条件 : where COLLECT_DEVICE.IOT_DEVICE(关联键：IOT_DEVICE_ID).COMPANY_ID = #{_equal_iotDeviceCompanyId}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "_equal_prodFactoryIotCompanyId", value = "筛选条件 : where COLLECT_DEVICE.COLLECT_DEVICE_TYPE(关联键：TYPE_ID).PROD_FOCTORY(关联键：PROD_FOCTORY_ID).IOT_COMPANY_ID = #{_equal_prodFactoryIotCompanyId}",required = false, dataType = "int", paramType = "query"),

    })
    //endregion
    //region 请求 : get
    @RequestMapping(value = "/collect-devices", method = RequestMethod.GET)
    //endregion
    @Author
    public ResponseEntity<CollectDeviceGetModel> get(@RequestParam @ApiIgnore Map<String, Object> query) throws ServiceException {
        CollectDeviceGetModel responseBody = collectDeviceService.get(initHeader(), query);
        return new ResponseEntity<>(responseBody, HttpStatus.OK);
        //endregion
    }
    //endregion
    //region /v2/collect-devices GET
    //region swagger响应码 : get2
    @ApiResponses({
            @ApiResponse(code = 200, message = "成功"),
    })
    //endregion
    //region swagger说明 : get2
    @ApiOperation(value="查询采集设备", notes="查询采集设备  \n简介 : 查询采集设备  \n步骤 :  \n1. 查询采集设备 : (√)  \n根据条件参数查询采集设备(COLLECT_DEVICE)对象collectDevice_1；  \ncollectDevice_1.gasConsume属性说明：  \n          对应于collectDevice_1所关联的第一个采集数据(COLLECT_DATA)对象(关联方式：COLLECT_DEVICE.ID = COLLECT_DATA.COLLECT_DEVICE_ID)的currentValue属性；  \ncollectDevice_1.gasConsume属性说明：  \n          对应于collectDevice_1所关联的报警数据(ALARM_DATA)对象(关联方式：COLLECT_DEVICE.ID = COLLECT_DATA.COLLECT_DEVICE_ID)集合的数量；  \n2. 返回信息 : (√)  \n根据条件参数和查询到结果组装结果对象并返回，  \nCollectDeviceGetModel中CollectDeviceModel的managementName属性说明：  \n          对应于CollectDeviceModel模型所关联的user_service.DeptModel模型(关联方式：CollectDeviceModel.deptId = user_service.DeptModel)的managementName属性；  \nCollectDeviceGetModel模型中CollectDeviceModel模型的subCompanyName属性说明：  \n          对应于CollectDeviceModel模型所关联的user_service.DeptModel模型(关联方式：CollectDeviceModel.deptId = user_service.DeptModel)的subCompanyName属性；  \n",produces = "application/json")
    //endregion
    //region swagger参数 : get2
    @ApiImplicitParams({
            @ApiImplicitParam(name = "token", value = "令牌",required = true, dataType = "string", paramType = "header"),

            @ApiImplicitParam(name = "show", value = "展示形式 one:展示一个,list:展示列表,null(空值):不展示", required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "show_total", value = "是否展示总数", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "show_info", value = "是否展示详情", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "show_type", value = "是否展示设备型号信息", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "show_iotDevice", value = "是否展示所属物联网设备信息", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "show_gasUser", value = "是否展示所属燃气用户信息", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "show_gasConsume", value = "是否展示总用气量", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "show_alarmCount", value = "是否展示总报警数", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "show_dept", value = "是否展示部门信息", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),            @ApiImplicitParam(name = "page", value = "页数", defaultValue = "1",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "count", value = "每页数量", defaultValue = "1",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "equal_id", value = "筛选条件 : where CollectDeviceModel.id = #{equal_id}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "equal_code", value = "筛选条件 : where CollectDeviceModel.code = #{equal_code}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "equal_companyId", value = "筛选条件 : where CollectDeviceModel.companyId = #{equal_companyId}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "equal_deptId", value = "筛选条件 : where CollectDeviceModel.deptId = #{equal_deptId}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "equal_deptCode", value = "筛选条件 : where CollectDeviceModel.deptCode = #{equal_deptCode}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "equal_categoryCode", value = "筛选条件 : where CollectDeviceModel.categoryCode = #{equal_categoryCode}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "like_code", value = "筛选条件 : where CollectDeviceModel.code like #{like_code}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "equal_iotDeviceId", value = "筛选条件 : where CollectDeviceModel.iotDeviceId = #{equal_iotDeviceId}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "like_iotDeviceCode", value = "筛选条件 : where CollectDeviceModel.iotDeviceCode like #{like_iotDeviceCode}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "like_gasUserName", value = "筛选条件 : where CollectDeviceModel.gasUserName like #{like_gasUserName}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "like_gasUserCode", value = "筛选条件 : where CollectDeviceModel.gasUserCode like #{like_gasUserCode}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "like_gasUserAddress", value = "筛选条件 : where CollectDeviceModel.gasUserAddress like #{like_gasUserAddress}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "greaterthanorequal_createTime", value = "筛选条件 : where CollectDeviceModel.createTime >= #{greaterthanorequal_createTime}",required = false, dataType = "long", paramType = "query"),
            @ApiImplicitParam(name = "lessthan_createTime", value = "筛选条件 : where CollectDeviceModel.createTime < #{lessthan_createTime}",required = false, dataType = "long", paramType = "query"),
            @ApiImplicitParam(name = "equal_gasUserId", value = "筛选条件 : where CollectDeviceModel.gasUserId = #{equal_gasUserId}",required = false, dataType = "long", paramType = "query"),
            @ApiImplicitParam(name = "equal_gasUserCode", value = "筛选条件 : where CollectDeviceModel.gasUserCode = #{equal_gasUserCode}",required = false, dataType = "string", paramType = "query"),

    })
    @ApiImplicitInternalParams({
            @ApiImplicitParam(name = "_token", value = "令牌",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-user-id", value = "用户编号",required = true, dataType = "int", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-user-code", value = "用户代码",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-user-name", value = "用户名",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-company-id", value = "公司编号",required = true, dataType = "int", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-dept-id", value = "部门编号",required = true, dataType = "int", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-user-type", value = "用户类型(关联: common_service.options.code, typeCode = 'USER_TYPE')",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-transaction-id", value = "交易流水号",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-transaction-type", value = "交易类型",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-access-mode", value = "访问模式 0:一般 1:全局",defaultValue = "0", required = false, dataType = "int", paramType = "header"),

            @ApiImplicitParam(name = "_show", value = "展示形式 one:展示一个,list:展示列表,null(空值):不展示", required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "_show_total", value = "是否展示总数", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "_show_info", value = "是否展示详情", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "_show_type", value = "是否展示设备型号信息", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "_show_iotDevice", value = "是否展示所属物联网设备信息", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "_show_gasUser", value = "是否展示所属燃气用户信息", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "_show_gasConsume", value = "是否展示总用气量", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "_show_alarmCount", value = "是否展示总报警数", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "_show_dept", value = "是否展示部门信息", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),            @ApiImplicitParam(name = "_is_paging", value = "是否分页", defaultValue = "false",required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "_page", value = "页数", defaultValue = "1",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "_count", value = "每页数量", defaultValue = "1",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "_equal_id", value = "筛选条件 : where CollectDeviceModel.id = #{_equal_id}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "_equal_code", value = "筛选条件 : where CollectDeviceModel.code = #{_equal_code}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "_equal_companyId", value = "筛选条件 : where CollectDeviceModel.companyId = #{_equal_companyId}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "_equal_deptId", value = "筛选条件 : where CollectDeviceModel.deptId = #{_equal_deptId}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "_equal_deptCode", value = "筛选条件 : where CollectDeviceModel.deptCode = #{_equal_deptCode}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "_equal_categoryCode", value = "筛选条件 : where CollectDeviceModel.categoryCode = #{_equal_categoryCode}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "_like_code", value = "筛选条件 : where CollectDeviceModel.code like #{_like_code}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "_equal_iotDeviceId", value = "筛选条件 : where CollectDeviceModel.iotDeviceId = #{_equal_iotDeviceId}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "_like_iotDeviceCode", value = "筛选条件 : where CollectDeviceModel.iotDeviceCode like #{_like_iotDeviceCode}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "_like_gasUserName", value = "筛选条件 : where CollectDeviceModel.gasUserName like #{_like_gasUserName}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "_like_gasUserCode", value = "筛选条件 : where CollectDeviceModel.gasUserCode like #{_like_gasUserCode}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "_like_gasUserAddress", value = "筛选条件 : where CollectDeviceModel.gasUserAddress like #{_like_gasUserAddress}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "_greaterthanorequal_createTime", value = "筛选条件 : where CollectDeviceModel.createTime >= #{_greaterthanorequal_createTime}",required = false, dataType = "long", paramType = "query"),
            @ApiImplicitParam(name = "_lessthan_createTime", value = "筛选条件 : where CollectDeviceModel.createTime < #{_lessthan_createTime}",required = false, dataType = "long", paramType = "query"),
            @ApiImplicitParam(name = "_equal_gasUserId", value = "筛选条件 : where CollectDeviceModel.gasUserId = #{_equal_gasUserId}",required = false, dataType = "long", paramType = "query"),
            @ApiImplicitParam(name = "_equal_gasUserCode", value = "筛选条件 : where CollectDeviceModel.gasUserCode = #{_equal_gasUserCode}",required = false, dataType = "string", paramType = "query"),

    })
    //endregion
    //region 请求 : get2
    @RequestMapping(value = "/v2/collect-devices", method = RequestMethod.GET)
    //endregion
    @Author
    public ResponseEntity<CollectDeviceGetModel> get2(@RequestParam @ApiIgnore Map<String, Object> query) throws ServiceException {
        CollectDeviceGetModel responseBody = collectDeviceService.get2(initHeader(), query);
        return new ResponseEntity<>(responseBody, HttpStatus.OK);
    }
    //endregion
}












































































































































































































































































































































































































































































































































































































































































